package net.kong.sns.rest.client.user;

import net.kong.sns.rest.client.method.JsonMethodInvokeBase;
import net.kong.sns.rest.client.KongApiMethod;
import net.kong.sns.rest.client.InvalidResponseException;
import net.kong.sns.rest.client.rest.HttpResponseContent;

/**
 * @author <a href="mailto:lanhuai@gmail.com">Ning Yubin</a>
 * @version $Id: LoggedInUserMethodInvoke.java,v 1.2 2009/11/04 17:17:38 ningyubin Exp $
 */
public class LoggedInUserMethodInvoke extends JsonMethodInvokeBase<Long> {
    public LoggedInUserMethodInvoke(String sessionKey) {
        super(KongApiMethod.USERS_GET_LOGGED_IN_USER, sessionKey);
    }

    @Override
    protected Long processJsonResponse(HttpResponseContent responseData) throws InvalidResponseException {
        return new Long(responseData.getBody().trim());
    }
}
